home *** CD-ROM | disk | FTP | other *** search
- Path: news.cencom.net!ns!tanp
- From: tanp@ns (Bill Wendling)
- Newsgroups: comp.lang.c
- Subject: Re: Compiler error on long multiplication?
- Date: 6 Feb 1996 07:46:50 GMT
- Organization: Cen-Com Internet
- Message-ID: <4f711a$rt1@news.cencom.net>
- References: <4f4fr0$pea@newnews.iafrica.com>
- NNTP-Posting-Host: ns.cencom.net
- X-Newsreader: TIN [version 1.2 PL2]
-
- Pieter Malan inexplicably wrote:
- } void main()
- ^^^^^^^^^^^ oops! (int main(void))
- } {
- } unsigned long a; //OR SIGNED
- } unsigned long x;
-
- } a = 1;
- } x = (a * 100L) * 100L; // x = 13379344 WRONG!!!
- } a = 100;
- } x = a * 100L; // x = 10000
-
- } }
-
- You might have a bug in your compiler. Have the compiler make an assembly
- listing of the code. Then repost that.
-
-
- --
- Bill Wendling | "Pinky, are you thinking what I'm thinking?"
- tanp@ns.cencom.net | "I think so, Brain, but burlap chafes me so."
- "Boom Shanka" | Finger me for my Geek Code...NOW!
-